import { ref } from "vue";

export const useFormRules = () => {
  // 校验规则
  const fromRules = ref({
    swipe_image: [
      {
        required: true,
        message: "轮播图片不能为空",
      },
    ],
    datetime: [
      {
        required: true,
        message: "展示时间不能为空",
      },
    ],
    status: [
      {
        required: true,
        whitespace: true,
        message: "角色不能为空",
        trigger: "blur",
      },
    ],
  });

  return {
    fromRules,
  };
};
